package cn.tedu.vehicle_rental.vehicle.controller;

import cn.tedu.vehicle_rental.basic.JsonResult;
import cn.tedu.vehicle_rental.vehicle.pojo.dto.VehicleDto;
import cn.tedu.vehicle_rental.vehicle.pojo.dto.VehicleVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/vehicle")
@Api(tags = "车辆管理模块")
public class VehicleController {
    /**
     * 用户选车模块
     * @param vehicleDto
     * @return
     */
    @ApiOperation("用户选车")
    @PostMapping("/choose")
    public JsonResult chooseVehicle(@RequestBody VehicleDto vehicleDto){
        return JsonResult.ok("车辆选择成功");
    }

    /**
     * 用户还车模块
     * @param vehicleDto
     * @return
     */
    @ApiOperation("用户还车")
    @PostMapping("/return")
    public JsonResult returnVehicle(@RequestBody VehicleDto vehicleDto){
        return JsonResult.ok("车辆还车成功");
    }
    @ApiOperation("增加车辆")
    @PostMapping("/addVehicle")
    public JsonResult addVehicle(@RequestBody VehicleDto vehicleDto){
        return JsonResult.ok("车辆添加成功");
    }

    @ApiOperation("删除车辆")
    @PostMapping("/deleteVehicle")
    public JsonResult deleteVehicle(@RequestBody VehicleDto vehicleDto){
        return JsonResult.ok("车辆删除成功");
    }
    @ApiOperation("修改车辆信息")
    @PostMapping("/aupdateVehicle")
    public JsonResult updateVehicle(@RequestBody VehicleDto vehicleDto){
        return JsonResult.ok("车辆修改成功");
    }
    @ApiOperation("查询车辆")
    @PostMapping("/selectVehicle")
    public JsonResult selectVehicle(@RequestBody VehicleDto vehicleDto){
        VehicleVO vehicleVO = new VehicleVO();
        return JsonResult.ok(vehicleVO);
    }
}
